#define _CRT_SECURE_NO_WARNINGS 

#include "Booking_system.h"



int main()
{
	PFiight_info PF;
	Init_Fiight_info(PF);
	PTicket_info PT;
	Init_Ticket_info(PT);
	while (1)
	{
		menu();
		int input;
		cin >> input;
		if (input == 8) {
			printf("退出成功\n");
			printf("航班信息已保存到该文件目录下的bookinfsystem_flight_info文件中\n");
			printf("航班信息已保存到该文件目录下的bookinfsystem_ticket_info文件中\n");
			break;
		}
		switch (input)
		{
		case 1:
			Push_back(PF);
			break;
		case 2:
			Delete(PF);
			break;
		case 3:
			Modifi(PF);
			break;
		case 4:
			Find(PF);
			break;
		case 5:
			Print(PF);
			break;
		case 6:
			Push_back_t(PT, PF);
			break;
		case 7:
			Delete_t(PT, PF);
		}
	}
	Destory(PT, PF);
	return 0;
}